<?php
/**
 * Created by PhpStorm.
 * User: Hongjw
 * Date: 2018/3/14
 * Time: 10:04
 */

namespace App\Tools\Controller;


trait ControllerMethodRoute
{
    public function showIndex(){
        $class = new \ReflectionClass(static::class);
        $arr = $class->getMethods();
        //dd($arr);
        $url = url($this->home);
        foreach ($arr as $value){
            echo "<a href='$url/$value->name'>$value->name</a><br>";
        }
    }

}